<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Member extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('member', function (Blueprint $table) {
            $table->increments('id');
            $table->string('openid',150)->unique()->nullable()->comment('微信openid');
            $table->string('nickname',150)->nullable()->comment('用户名');
            $table->string('avatar')->nullable()->comment('用户头像');
            $table->timestamp('subscribe_time')->nullable()->comment('关注时间');
            $table->tinyInteger('sex')->nullable()->comment('性别');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('member');
    }
}
